package com.twoscreen;

import java.util.Date;
import java.util.logging.Logger;

import javax.jdo.PersistenceManager;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Inheritance;
import javax.jdo.annotations.InheritanceStrategy;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class Question {
	@NotPersistent
	private static PersistenceManager pm = PMF.get().getPersistenceManager();
	
	@NotPersistent
	private static final Logger log = Logger.getLogger("com.twoscreen.Question.java");
	
	@NotPersistent
	private static final String videoIdPropertyName = "videoId";
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
	private String videoId;
	
	@Persistent
	private Date timeStamp;
	
	@Persistent
	private Integer points;
	
	public Integer getPoints() {
		return points;
	}

	public void setPoints(int points) {
		this.points = points;
	}

	public Key getKey() {
		return key;
	}
	
	public String getVideoId() {
		return videoId;
	}
	
	public Date getTimeStamp() {
		return timeStamp;
	}
	
	public void setVideoId(String videoId) {
		this.videoId = videoId;
	}
	
	public void setTimeStamp(Date timeStamp) {
		this.timeStamp = timeStamp;
	}
	
	public static String getVideoIdPropertyName() {
		return videoIdPropertyName;
	}
	
	
}
